
GridDlg.controllerName = "/attendance/record";
GridDlg.PrimaryKey = "reId";
GridDlg.formId = "record";
/**
 * 用户详情对话框（可用于添加和修改对话框）
 */
GridDlg.validateFields =  {

    reDate: {
        validators: {
            notEmpty: {
                message: '时间不能为空'
            },
            date: {
                format: 'YYYY-MM-DD hh:mm:ss',
                    message: '时间格式错误'
            }
        }
    },
    reMemo: {
        validators: {
            notEmpty: {
                message: '补卡原因不能为空'
            }
        }
    }
};

var initLaydate = function(id) {

    var laydatetime = {
        elem: '#'+id,
        format: 'YYYY-MM-DD hh:mm:ss',
        istime: true,
        istoday: false,
        start: laydate.now(0, "YYYY-MM-DD hh:mm:ss")
    };
    laydate(laydatetime);
}

/**
 * 收集数据
 */
GridDlg.collectData = function () {
    this.set('reId').set('reDate').set('reMemo');
};

$(function () {
    initLaydate('reDate');
    Common.initValidator(GridDlg.formId, GridDlg.validateFields);
});
